package com.itheima.health.dao;




import com.itheima.health.pojo.CheckItem;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 持久层Dao接口
 */

public interface CheckItemDao {
    /**
     * 添加检查项
     * @param checkItem
     */
    @Insert("insert into t_checkitem values " +
            "(null, #{code}, #{name}, #{sex}," +
            " #{age}, #{price}, #{type}, #{attention}," +
            "#{remark});")
    public void add(CheckItem checkItem);
    /**
     * 查询所有检查项
     * @return 所有检查项数据
     */
    @Select("select * from t_checkitem;")
    List<CheckItem> findAll();
}


